<?php

use app\adminapi\middleware\JwtAuth;
use app\adminapi\middleware\OperateLog;
use think\facade\Route;

// 登录
Route::post('login', 'Auth/login');

// 刷新token
Route::post('refreshToken', 'Auth/refreshToken');

// 验证码
Route::get('captcha', 'Auth/captcha');

Route::group(function () {
    // 获取管理员信息
    Route::get('getAdminInfo', 'Auth/getAdminInfo')->middleware(\app\adminapi\middleware\JwtAuth::class);

    // 获取管理员菜单路由
    Route::get('getMenuRoutes', 'Auth/getMenuRoutes')->middleware(\app\adminapi\middleware\JwtAuth::class);

    // 获取管理员权限标识列表
    Route::get('getPermissions', 'Auth/getPermissions')->middleware(\app\adminapi\middleware\JwtAuth::class);

})->middleware([JwtAuth::class, OperateLog::class]);